Page({
  data: {
    announcementList: [],
  },
  onLoad() {
    this.getAnnouncementList()
  },
  async getAnnouncementList() {
    const res = await wx.http({
      method: 'get',
      url: '/announcement',
    })
    // 能走到这，上面的Promise必须成功
    this.setData({ announcementList: res.data })
  },
})
